//
//  TIMCommon.h
//  Demo_TIM
//
//  Created by Deli Xia on 2018/5/29.
//  Copyright © 2018年 Deli Xia. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,TIMOperateGroupType) {        // 操作群组通知
    TIMOperateGroupTypeCreateGroup = 2000,
    TIMOperateGroupTypeOfferGroup,
    TIMOperateGroupTypeRemoveGroup,
    TIMOperateGroupTypeExitGroup,
    TIMOperateGroupTypeModifyGroupName,
    TIMOperateGroupTypeDismissGroup,
    TIMOperateGroupTypeModifyMemoGroup,
    TIMOperateGroupTypeStopTalkGroup,
    TIMOperateGroupTypeOpenTalkGroup,
    TIMOperateGroupTypeTransferOwner,
    TIMOperateGroupTypeAddAdminGroup,
    TIMOperateGroupTypeDeleteAdminGroup,
    TIMOperateGroupTypeGroupOfferStop,
    TIMOperateGroupTypeGroupOfferOpen,
    TIMOperateGroupTypeScanCodeOfferGroup,
    TIMOperateGroupTypeGrpOfferAuditOpen,
    TIMOperateGroupTypeGrpOfferAuditStop,
    TIMOperateGroupTypeGrpOfferAuditCommit,
    TIMOperateGroupTypeGrpOfferAuditAck,
    TIMOperateGroupTypeGrpKickOffMsgOpen,
    TIMOperateGroupTypeGrpKickOffMsgStop,
    TIMOperateGroupTypeUnknow,
};

typedef NS_ENUM(NSInteger, TIMOperationCommentGroup) {
    TIMOperationCommentGroupQuit,
    TIMOperationCommentGroupJoin,
    TIMOperationCommentGroupOpenMessage,
    TIMOperationCommentGroupStopMessage,
    TIMOperationCommentGroupCreate,
    TIMOperationCommentGroupClose,
    TIMOperationCommentGroupStopTalk,
    TIMOperationCommentGroupOpenTalk,
    TIMOperationCommentGroupMessage,
};

typedef NS_ENUM(NSInteger,TIMAnnounceMent_Operation) {
    TIMAnnounceMent_Operation_GrpAnnounceMentCreate,            // 创建
    TIMAnnounceMent_Operation_GrpAnnounceMentModify,            // 修改
    TIMAnnounceMent_Operation_GrpAnnounceMentList,              // 查询群公告列表
    TIMAnnounceMent_Operation_GrpAnnounceMentGet,               // 老接口，查询单个
};

typedef NS_ENUM(NSInteger, TIMMessageFriendOperation) {
    TIMMsgOperation_OperationFriConfirm = 100,
    TIMMsgOperation_OperationFriAdd,
    TIMMsgOperation_OperationFriCancel,
};

/**
 *  会话类型
 */
typedef NS_ENUM(NSInteger, TIMConversationType) {
    TIMConversationTypePersonal,     // 个人
    TIMConversationTypeGroup,        // 群聊
    TIMConversationTypePublic,       // 公众号
    TIMConversationTypeServerGroup,  // 服务组（订阅号、企业号）
};

/**
 *  会话提示类型
 */
typedef NS_ENUM(NSInteger, TIMClueType) {
    TIMClueTypeNone,
    TIMClueTypePoint,
    TIMClueTypePointWithNumber,
};

/**
 *  消息提醒类型
 */
typedef NS_ENUM(NSInteger, TIMMessageRemindType) {
    TIMMessageRemindTypeNormal,    // 正常接受
    TIMMessageRemindTypeClosed,    // 不提示
    TIMMessageRemindTypeNotLook,   // 不看
    TIMMessageRemindTypeUnlike,    // 不喜欢
};

/**
 *  链接状态
 */
typedef NS_ENUM(NSInteger, TIMSocketConnectStatus) {
    TIMSocketConnectStatusUnConnect,         //未连接
    TIMSocketConnectStatusConnected,             //连接
    TIMSocketConnectStatusDisconnected,          //断开连接
    TIMSocketConnectStatusPrepared,               //准备
};

extern NSString * const TPSLIVE_TIM_OPERATION_COMMENT_BROADCAST;       // 直播评论组关闭，评论打开或关闭广播
extern NSString * const TIM_FROM_COMMENT_MESSAGE_BROADCAST;            // 收到评论组消息

extern NSString * const TIM_LOGIN_KICKED_OFF_LINE_BROADCAST;           // 被踢下线广播
extern NSString * const TIM_OPERATE_FRIEND_ACTION_BROADCAST;           // 好友关系广播
extern NSString * const TIM_FROM_SERVER_MESSAGE_BROADCAST;             // 收到消息广播
extern NSString * const TIM_REVOKE_MESSAGE_BROADCAST;                  // 收到消息撤回广播
extern NSString * const TIM_OPERATION_GROUP_BROADCAST;                 // 群组操作广播
extern NSString * const TIM_FINISH_LOGIN_SYNC_SERVER_BROADCAST;        // 登陆完成后同步服务器数据,包括第一次登录和拉取离线消息后同步
extern NSString * const TIM_PULL_GROUP_MEMBERS_SUCCESS_BROADCAST;      // 拉取群成员完成后通知
extern NSString * const TIM_FREEZE_ACCOUNT_SERVER_BROADCAST;           // 冻结账号
extern NSString * const TIM_OFFLINE_SERVER_MESSAGE_BROADCAST;          // 离线消息监听
extern NSString * const TIM_TPS_NOT_NETWORK_BROADCAST;                 // 没有网络广播
extern NSString * const TIM_TPS_SOCKET_CONNECT_STATUS_BROADCAST;       // 链接状态广播

@interface TIMSdkConfig : NSObject

@property(nonatomic, copy) NSString *hostIP;

@property (nonatomic, assign) int port;

/**
 *  用户标识接入SDK的应用ID，后续需要后台生成，作为第三方接入唯一标志
 */
@property(nonatomic, copy) NSString *sdkAppKey;

@property(nonatomic, assign) int32_t sdkAppID;

@end

@interface TIMCommon : NSObject

@end
